package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 长者生活服务记录实体类
 * 
 * @author mark
 * @date 2025-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_service_living")
@Schema(name = "ElderLiving", description = "长者生活服务记录表")
public class ElderLiving {

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "长者ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "老人床位号")
    @TableField("elder_bed_number")
    private String elderBedNumber;

    @Schema(description = "老人房间号")
    @TableField("elder_room_number")
    private String elderRoomNumber;

    @Schema(description = "事故报告")
    @TableField("accident_report")
    private String accidentReport;

    @Schema(description = "探访人的名字")
    @TableField("visit_name")
    private String visitName;

    @Schema(description = "探访人的名字")
    @TableField("visit_person")
    private String visitPerson;

    @Schema(description = "探访人的事由")
    @TableField("visit_purpose")
    private String visitPurpose;

    @Schema(description = "探访开始时间")
    @TableField("visit_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime visitStartTime;

    @Schema(description = "探访结束时间")
    @TableField("visit_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime visitEndTime;

    @Schema(description = "请假申请内容")
    @TableField("leave_content")
    private String leaveContent;

    @Schema(description = "请假原因")
    @TableField("leave_reason")
    private String leaveReason;

    @Schema(description = "请假开始时间")
    @TableField("leave_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime leaveStartTime;

    @Schema(description = "请假结束时间")
    @TableField("leave_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime leaveEndTime;

    @Schema(description = "事故发生时间")
    @TableField("incident_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime incidentTime;

    @Schema(description = "事故地点")
    @TableField("incident_location")
    private String incidentLocation;

    @Schema(description = "事故描述")
    @TableField("incident_description")
    private String incidentDescription;

    @Schema(description = "严重程度：minor, moderate, severe")
    @TableField("incident_severity")
    private String incidentSeverity;
}
